<?php

namespace App\Http\Controllers\Stats\User;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\Stats\User\Player\DayResource;
use App\Http\Resources\Stats\User\Player\WeekResource;
use App\Http\Resources\Stats\User\Player\MonthResource;
use App\Services\Stats\User\PlayerService;

class PlayerController extends Controller
{

    /**
     * 统计图【天】
     */
    public function day(Request $request)
    {
        $datas = PlayerService::make()->day($request);

        return DayResource::make($datas);
    }

    /**
     * 统计图【周】
     */
    public function week(Request $request)
    {
        $datas = PlayerService::make()->week($request);

        return WeekResource::make($datas);
    }

    /**
     * 统计图【月】
     */
    public function month(Request $request)
    {
        $datas = PlayerService::make()->month($request);

        return MonthResource::make($datas);
    }
}
